//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml.Drawing
{
    class Fill: IOfficeXmlSerializable
    {
        private Ext? _ext;
        private FillType? _type;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read(VmlConstants.OfficeNamespace + "fill"))
            {
                _ext = c.GetOptionalEnum<Ext>("ext");
                _type = c.GetOptionalEnum<FillType>("type");
            }

        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write(VmlConstants.OfficeNamespace + "fill"))
            {
                c.SetOptionalEnum<Ext>("ext", _ext);
                c.SetOptionalEnum<FillType>("type", _type);
            }
        }
    }
}